Optimal. Leaf size=320 \[ -\frac {2 (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}+\frac {2 \sqrt {a+b} (b (B-C)+a C) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.27, antiderivative size = 320, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4001,
3869, 4090, 3917, 4089} \begin {gather*} \frac {2 \sqrt {a+b} (a C+b (B-C)) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d}-\frac {2 B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}-\frac {2 C (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4001
Rule 4089
Rule 4090
Rule 4157
Rubi steps
\begin {align*} \int \cos (c+d x) \sqrt {a+b \sec (c+d x)} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \sqrt {a+b \sec (c+d x)} (B+C \sec (c+d x)) \, dx\\ &=(a B) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx+\int \frac {\sec (c+d x) (b B+a C+b C \sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 \sqrt {a+b} B \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}+(b C) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx+(b (B-C)+a C) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} C \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}+\frac {2 \sqrt {a+b} (b (B-C)+a C) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{b d}-\frac {2 \sqrt {a+b} B \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 17.73, size = 863, normalized size = 2.70 \begin {gather*} \frac {2 C \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{d}+\frac {2 \sqrt {a+b \sec (c+d x)} \left (a \sqrt {\frac {-a+b}{a+b}} C \tan \left (\frac {1}{2} (c+d x)\right )+b \sqrt {\frac {-a+b}{a+b}} C \tan \left (\frac {1}{2} (c+d x)\right )-2 a \sqrt {\frac {-a+b}{a+b}} C \tan ^3\left (\frac {1}{2} (c+d x)\right )+a \sqrt {\frac {-a+b}{a+b}} C \tan ^5\left (\frac {1}{2} (c+d x)\right )-b \sqrt {\frac {-a+b}{a+b}} C \tan ^5\left (\frac {1}{2} (c+d x)\right )+2 i a B \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+2 i a B \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-i (a-b) C E\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-i (a-b) (B-C) F\left (i \sinh ^{-1}\left (\sqrt {\frac {-a+b}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}\right )}{\sqrt {\frac {-a+b}{a+b}} d \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)} \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1371\) vs.
\(2(293)=586\).
time = 0.18, size = 1372, normalized size = 4.29
method | result | size |
default | \(\text {Expression too large to display}\) | \(1372\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (B + C \sec {\left (c + d x \right )}\right ) \sqrt {a + b \sec {\left (c + d x \right )}} \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \cos \left (c+d\,x\right )\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________